a directory was specified where only a file is allowed